package agriculture.service;

import agriculture.bean.Comment;
import agriculture.bean.Product;
import agriculture.dto.StockDTO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

public interface ProductService {
    List<Product> getActiveProducts();
    List<Product> getProductsByCategory(Long categoryId); //  新增根据分类查询商品的方法
    //查询商品详情
    List<Product> selectProductDetail(Long id);

    //获取商品所有有关的评论
    List<Comment> getCommentsByProductId(Long productId);

    //扣除商品库存接口
    boolean decreaseStock(StockDTO stockDTO);
}
